﻿
namespace Mulala.Cavan.Application.Seedwork
{
    using System;
    using System.Collections.Generic;
    using System.Diagnostics.Contracts;
    using System.Linq;
    using Mulala.Cavan.Core.Persistent;

    /// <summary>
    ///     Facades (EntityFacades) represents the middle tier
    ///     between DAO and any upper layer. 
    ///     Data are manipulated with (Ioc set) IDao instance;
    ///     but passed from or to upper layer when the Busines rules are met.
    ///     Facades are responsible for Add, Edit and Delete checks (fitting the Business rules)
    ///     as well as for corret Filter settings to be passed to IDao 
    ///     (e.g. the lowest DateTime boundary for SQL Server is not the same 
    ///     as the lowest value for DateTime in .NET)
    /// </summary>
    /// <typeparam name = "T"></typeparam>
    /// <typeparam name = "TID"></typeparam>
    /// <typeparam name = "TSearch"></typeparam>
    public interface IEntityAppService<T, in TID, in TSearch> : IReadAppService<T, TID, TSearch>, IWriteAppService<T, TID>
        where T : class, IPersistentObjectWithTypedId<TID>
        where TSearch : class,ISearch<TID>
    {
    }
}